import './assets/main.css'
import './assets/styles/animations.css'
import './assets/styles/global.css'

import { createApp } from 'vue'
import App from './App.vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import router from './router'
import { ElMessage } from 'element-plus'
import { createPinia } from 'pinia'

const app = createApp(App)
app.use(ElementPlus)
app.use(router)
app.use(createPinia())

// 全局错误处理
app.config.errorHandler = (err) => {
  console.error(err)
  ElMessage.error('发生了一个未知错误')
}

app.mount('#app')
